home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Utilities / Network / QUE / Bridge / Que Script
Text File  |  1989-07-19  |  4KB  |  164 lines

  1. *
  2. * Que Bridge Script
  3. *
  4. *  7/17/89 Version 1.0
  5. *
  6. * Copyright (c) 1988, 1989 Rob Kassel
  7. *
  8. * Permission to use, copy, modify, and distribute
  9. * this software and its documentation for any purpose
  10. * without fee is hereby granted, provided that the above
  11. * copyright notice appear in all copies and that both that
  12. * copyright notice and this permission notice appear in
  13. * supporting documentation, and that the name of M.I.T. not
  14. * be used in advertising or publicity pertaining to distribution
  15. * of the software without specific, written prior permission.
  16. * The authors and M.I.T. make no representations about the 
  17. * suitability of this software for any purpose.  It is provided
  18. * "as is" without express or implied warranty.
  19. *
  20. ***********************************************
  21. * CONNECT TO HOST
  22. ***********************************************
  23. :IN
  24. OOPS 60,FAILURE
  25. ***********************************************
  26. * $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  27. * Add anything you need to negotiate the initial connection
  28. * here.  If the connection cannot be established, issue
  29. * a FAILURE.  If the connection is established, GOTO
  30. * OPEN.
  31. * $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  32. ***********************************************
  33. :OPEN
  34. ALERT 1,LOGIN,login:
  35. ALERT 2,TRYKILL,ZSRHKQV>
  36. PAUSE 5
  37. TYPE ^M
  38. PAUSE 5
  39. TYPE ^M
  40. PAUSE 5
  41. TYPE ^M
  42. PAUSE 5
  43. :TRYKILL
  44. ALERT 1,OPEN,que mail transfer complete
  45. ALERT 2,,
  46. TYPE ^B^B^B^B^M
  47. TYPE logout^M
  48. PAUSE 3
  49. TYPE logout^M
  50. PAUSE 3
  51. TYPE logout^M
  52. PAUSE 3
  53. ALERT 1,,
  54. FAILURE
  55. :LOGIN
  56. ALERT 1,PASSWD,Password:
  57. ALERT 2,,
  58. TYPE «LOGID»^M
  59. PAUSE 69
  60. FAILURE
  61. :PASSWD
  62. ALERT 1,NOWIN,ZSRHKQV>
  63. ALERT 2,FAILURE,incorrect
  64. TYPE «PASSWORD»^M
  65. PAUSE 69
  66. FAILURE
  67. :NOWIN
  68. ALERT 1,,
  69. ALERT 2,,
  70. SUCCESS
  71.  
  72. ***********************************************
  73. * Get the next message if there is one.
  74. ***********************************************
  75. :RECEIVE
  76. OOPS 400,ABORTOUT
  77. ALERT 1,NOMORE,No mail to read.
  78. TYPE queread^M
  79. WAIT Message in 5
  80. ALERT 1,,
  81. PAUSE 1
  82. BUFFER ENDOFMESSAGETOMACQRLMT^MFrom M^MZSRHKQV
  83. RECEIVE Subject:,X-Mac-To:,X-Mac-From:,<,>
  84. TYPE rm readMsg^M
  85. WAIT ZSRHKQV>
  86. SUCCESS
  87. ***********************************************
  88. * We're done reading mail.
  89. ***********************************************
  90. :NOMORE
  91. ALERT 1,,
  92. FAILURE
  93. ***********************************************
  94. * There was an error somewhere in receive.
  95. ***********************************************
  96. :ABORTOUT
  97. ALERT 1,,
  98. TYPE ^B^B^B^B^M
  99. FAILURE
  100.  
  101. ***********************************************
  102. * Send the next message.
  103. ***********************************************
  104. :SEND
  105. OOPS 400,FAILURE
  106. ALERT 1,BADREPLY,Invalid User
  107. TYPE quecheck «FROM»^M
  108. WAIT ZSRHKQV>
  109. ALERT 1,,
  110. TYPE quesend^M
  111. TYPE «ADDRESS»^L^M
  112. TYPE Received: via Que with SCRIPT1.0^M
  113. TYPE From: «FROM»^M
  114. TYPE Subject: «TOPIC»^M
  115. TYPE ^M
  116. DUMP
  117. TYPE ^M^D
  118. WAIT ZSRHKQV>
  119. SUCCESS
  120. ***********************************************
  121. * Send another copy of the previous message.
  122. ***********************************************
  123. :AGAIN
  124. OOPS 400,FAILURE
  125. TYPE quesend -a^M
  126. TYPE «ADDRESS»^L^M
  127. WAIT ZSRHKQV>
  128. SUCCESS
  129. ***********************************************
  130. * Punt sending if we can't reply to sender
  131. ***********************************************
  132. :BADREPLY
  133. ERRORINADDRESS
  134. SUCCESS
  135.  
  136. ***********************************************
  137. * Log out of host.
  138. ***********************************************
  139. :BYE
  140. OOPS 20,SUCCESS
  141. ALERT 1,LOGGEDOUT,que mail transfer complete
  142. TYPE logout^M
  143. PAUSE 3
  144. TYPE logout^M
  145. PAUSE 3
  146. TYPE logout^M
  147. PAUSE 3
  148. :LOGGEDOUT
  149. ALERT 1,,
  150. ***********************************************
  151. * $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  152. * Add anything you need to negotiate closing the connection
  153. * here.  If the connection cannot be closed, issue
  154. * a SUCCESS anyway.
  155. * $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  156. ***********************************************
  157. SUCCESS
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.